package cn.yuanqiao.archive.danganzhengli.domain;



import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;

/**
 * 互见号对象 A001_FILE_ASSOCIATION
 *
 * @author xy
 * @date 2024-10-08
 */
public class FileAssociation extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    private final String BIGTABLENAME = "_FILE_ASSOCIATION";

    public FileAssociation() {
        String tenantCode = SecurityUtils.getTenantCode();
        if (StringUtils.isEmpty(tenantCode)) {
           // throw new ServiceException("tenantCode is null");
        } else {
            this.tableName = tenantCode.toUpperCase() + BIGTABLENAME;
        }
    }


    /** id */
    private Long id;

    /** 档案ID */
    @Excel(name = "档案ID")
    private Long daId;

    /** 关联ID */
    @Excel(name = "关联ID")
    private Long glId;

    /** 档案类型 */
    @Excel(name = "档案类型")
    private String type;

    /** 创建人Id */
    @Excel(name = "创建人Id")
    private Long createId;

    private String tableName;

    private String title;

    private String dh;

    private String nd;

    private String bgqx;


    private String qzh;

    private Long[] glIds;

    private String subTableName;

    private Long categoryId;


    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setDaId(Long daId)
    {
        this.daId = daId;
    }

    public Long getDaId()
    {
        return daId;
    }
    public void setGlId(Long glId)
    {
        this.glId = glId;
    }

    public Long getGlId()
    {
        return glId;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }
    public void setCreateId(Long createId)
    {
        this.createId = createId;
    }

    public Long getCreateId()
    {
        return createId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDh() {
        return dh;
    }

    public void setDh(String dh) {
        this.dh = dh;
    }

    public String getNd() {
        return nd;
    }

    public void setNd(String nd) {
        this.nd = nd;
    }

    public String getBgqx() {
        return bgqx;
    }

    public void setBgqx(String bgqx) {
        this.bgqx = bgqx;
    }

    public String getQzh() {
        return qzh;
    }

    public void setQzh(String qzh) {
        this.qzh = qzh;
    }

    public Long[] getGlIds() {
        return glIds;
    }

    public void setGlIds(Long[] glIds) {
        this.glIds = glIds;
    }

    public String getSubTableName() {
        return subTableName;
    }

    public void setSubTableName(String subTableName) {
        this.subTableName = subTableName;
    }

    @Override
    public Long getCategoryId() {
        return categoryId;
    }

    @Override
    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    @Override
    public String toString() {
        return "FileAssociation{" +
                "BIGTABLENAME='" + BIGTABLENAME + '\'' +
                ", id=" + id +
                ", daId=" + daId +
                ", glId=" + glId +
                ", type='" + type + '\'' +
                ", createId=" + createId +
                ", tableName='" + tableName + '\'' +
                ", title='" + title + '\'' +
                ", dh='" + dh + '\'' +
                ", nd='" + nd + '\'' +
                ", bgqx='" + bgqx + '\'' +
                ", qzh='" + qzh + '\'' +
                ", glIds=" + Arrays.toString(glIds) +
                ", subTableName='" + subTableName + '\'' +
                ", categoryId=" + categoryId +
                '}';
    }
}
